package com.xie.service;

import com.xie.dao.CourseMapper;
import com.xie.pojo.Course;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseServiceImpl implements CourseService{

    private CourseMapper courseMapper;
    public void setCourseMapper(CourseMapper courseMapper) {
        this.courseMapper = courseMapper;
    }


    public int addCourse(Course course) {
        return courseMapper.addCourse(course);
    }

    public List<Course> queryAllCourse() {
        return courseMapper.queryAllCourse();
    }

    public int deleteCourse(int cid) {
        return courseMapper.deleteCourse(cid);
    }

    public int updateCourse(Course course) {
        return courseMapper.updateCourse(course);
    }

    public Course queryCourse(int cid) {
        return courseMapper.queryCourse(cid);
    }
}
